package com.digitalart.site.section.subsectiontype {
	import flash.events.Event;
	import flash.events.EventDispatcher;

	/**
	 * @author johan.chaves
	 */
	public class SubSectionTypeController extends EventDispatcher {
		
		public static const SUB_SECTION_READY : String = "subsectionready";
		
		private var _subSectionView : SubSectionTypeView;
		private var _subSectionModel : SubSectionTypeModel;
		
		public function SubSectionTypeController() {
			super(this);
		}
		
		public function init() : void {
			_subSectionView = new SubSectionTypeView();
			_subSectionView.addEventListener(SubSectionTypeView.SUB_SECTION_VIEW_READY, onViewReady);
			_subSectionView.init();
		}

		private function onViewReady(event : Event) : void {
			dispatchEvent(new Event(SUB_SECTION_READY));			
		}
		
		public function get subSectionView() : SubSectionTypeView {
			return _subSectionView;
		}
		
		public function set subSectionView(subSectionView : SubSectionTypeView) : void {
			_subSectionView = subSectionView;
		}
	}
}
